import Vue from 'vue';
import Router from 'vue-router';
import SchoolMgmt from '@/router/module/schoolMgmt';
import TeacherMgmt from '@/router/module/teacherMgmt';
import StudentMgmt from '@/router/module/studentMgmt';
import ScoreMgmt from '@/router/module/scoreMgmt';
import workMgmt from '@/router/module/workMgmt';
const Login = () => import('@/pages/Login');
const Index = () => import('@/pages/Index');
import Pagination from '@/components/CommonPagination'
Vue.use(Router);

const children = [
  ...SchoolMgmt,
  ...TeacherMgmt,
  ...StudentMgmt,
  ...ScoreMgmt,
  ...workMgmt
]

const router = new Router({
  routes: [
    {
      path: '',
      redirect: '/login',
    },
    {
      path: '/login',
      component: Login,
    },
    {
      path: '/index',
      component: Index,
      children,
    }
  ],
  // mode: 'history',
});

export default router;
